package entity;

import java.io.Serializable;

public class StudentScore implements Serializable,Comparable<StudentScore> {
    private Integer studentID;
    private Integer java;//java成绩
    private Integer math;//数学成绩

    public StudentScore(Integer studentID, Integer java, Integer math) {
        this.studentID = studentID;
        this.java = java;
        this.math = math;
    }

    public Integer getStudentID() {
        return studentID;
    }

    public void setStudentID(Integer studentID) {
        this.studentID = studentID;
    }

    public Integer getJava() {
        return java;
    }

    public void setJava(Integer java) {
        this.java = java;
    }

    public Integer getMath() {
        return math;
    }

    public void setMath(Integer math) {
        this.math = math;
    }

    @Override
    public String toString() {
        return "studentScore{" +
                "studentID=" + studentID +
                ", java=" + java +
                ", math=" + math +
                '}';
    }

    @Override
    public int compareTo(StudentScore o) {//按java分数比较
        return this.java-o.java;
    }
}
